package org.jeecg.glr.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.glr.entity.GlrSensor;
import org.jeecg.glr.entity.GlrSensorData;

import java.util.List;

/**
 * @Description: 传感器
 * @Author: jeecg-boot
 * @Date:   2020-02-11
 * @Version: V1.0
 */
public interface GlrSensorMapper extends BaseMapper<GlrSensor> {


    @Select("${sql}")
    GlrSensorData getGlrSensorOne(@Param("sql")String sql);
    @Select("${sql}")
    List<String> getGlrSensorStatus(@Param("sql")String sql);

    @Select("select * from glr_sensor where code=#{code}")
    GlrSensor getGlrSensorByCode(@Param("code")String code);
    @Select("select * from glr_sensor")
    public List<GlrSensor> getSenSorAll();
    @Update("update glr_sensor set status='N'")
    void initSenSor();
}
